package vip.xiaonuo.pay.modular.alipay.service;

import com.alipay.api.domain.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface IAliPayService {

    /**
     * app统一收单下单并支付页面接口的调用
     *
     * @param model
     * @return
     * @
     */
    String tradeAppPay(AlipayTradeAppPayModel model);

    /**
     * 同步通知回调
     *
     * @param request
     * @return
     */
    boolean handleReturn(HttpServletRequest request);

    /**
     * 异步通知回调
     *
     * @param params
     * @return
     */
    boolean handleNotify(Map<String, String> params);

    /**
     * 该接口是页面跳转接口，用于生成用户访问支付宝的跳转链接
     *
     * @param model
     * @return
     * @
     */
    String tradePagePay(AlipayTradePagePayModel model);

    /**
     * 统一退费接口
     *
     * @param model
     * @return
     */
    String tradeRefund(AlipayTradeRefundModel model);

    /**
     * 统一查单接口
     *
     * @param model
     * @return
     */
    String tradeQuery(AlipayTradeQueryModel model);

    /**
     * 统一关单接口
     *
     * @param model
     * @return
     */
    String tradeClose(AlipayTradeCloseModel model);

    /**
     * 统一收单交易退款查询
     *
     * @param model
     * @return
     */
    String tradeFastPayRefundQuery(AlipayTradeFastpayRefundQueryModel model);

}
